# import pymysql
#
# # 打开数据库连接
# db = pymysql.connect("db1.dev1.yiyao.cc", "testuser", "test123", "TESTDB")
#
# # 使用 cursor() 方法创建一个游标对象 cursor
# cursor = db.cursor()
#
# # 使用 execute() 方法执行 SQL，如果表存在则删除
# cursor.execute("DROP TABLE IF EXISTS EMPLOYEE")

# 使用预处理语句创建表
sql = """insert into seller_channel_bank (bank_sid, channel_id, bank_code, bank_name)
select cb.bank_sid, cb.payChannelBase_id, cb.bank_code, b.bank_name from ( select * from channel_bank where sid = %s 
) cb left join bank b on cb.bank_sid =  b.sid ; """

for i in range(240, 275):
    # cursor.execute(sql % i)
    print(sql % i)

# 关闭数据库连接
# db.close()
